{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(np.float64(41.33509168550616), np.float64(0.7545842753077117))"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np # type: ignore\n",
    "\n",
    "x = np.array([56, 72, 69, 88, 102, 86, 76, 79, 94, 74])\n",
    "y = np.array([92, 102, 86, 110, 130, 99, 96, 102, 105, 92])\n",
    "\n",
    "\n",
    "\n",
    "def least_squares_algebraic(x: np.ndarray, y: np.ndarray):\n",
    "    \"\"\"最小二乘法代数求解\"\"\"\n",
    "    n = x.shape[0]\n",
    "    w1 = (n * sum(x * y) - sum(x) * sum(y)) / (n * sum(x * x) - sum(x) * sum(x))\n",
    "    w0 = (sum(x * x) * sum(y) - sum(x) * sum(x * y)) / (\n",
    "        n * sum(x * x) - sum(x) * sum(x)\n",
    "    )\n",
    "    return w0, w1\n",
    "\n",
    "least_squares_algebraic(x, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "def square_loss(x: np.ndarray, y: np.ndarray, w0: float, w1: float):\n",
    "    \"\"\"平方损失函数\"\"\"\n",
    "    loss = sum(np.square(y - (w0 + w1 * x)))\n",
    "    return loss\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(447.69153479025357)"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "w0 = least_squares_algebraic(x, y)[0]\n",
    "w1 = least_squares_algebraic(x, y)[1]\n",
    "\n",
    "square_loss(x, y, w0, w1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1d94ab0f790>]"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvc2/+5QAAAAlwSFlzAAAPYQAAD2EBqD+naQAAO+ZJREFUeJzt3Qd4VVX69uEnlNAJxYGAoiKiwKAoIBjFgtIVVECkd1EEe0UH0dEZRiyjKIL6Z7BgRRAFRxAF4UPpiEoZBzVKS0QFEggESHK+693LMAkGDSHJ3uec331dx2SfvYkrO+U8WeVdMaFQKCQAAIAAKeF3AwAAAA5HQAEAAIFDQAEAAIFDQAEAAIFDQAEAAIFDQAEAAIFDQAEAAIFDQAEAAIFTSmEoKytL27ZtU6VKlRQTE+N3cwAAQD5Ybdjdu3erdu3aKlGiROQFFAsnderU8bsZAACgADZv3qwTTjgh8gKK9Zxkf4KVK1f2uzkAACAfUlNTvQ6G7NfxiAso2cM6Fk4IKAAAhJf8TM9gkiwAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAAgcAgoAAPifnTulK6+UFiyQn8JyN2MAAFAEvvhC6tpV+u476fPPpY0bpdhY+YEeFAAAIE2dKiUkuHBy8snSzJm+hRNDQAEAIJodOCDdeKPUr5+0b5/Uvr20cqV09tm+NouAAgBAtNq2TWrdWnrmGXc8erT0/vtS9ep+t4w5KAAARKVFi6QePaQff5Ti4qRXXpE6d1ZQ0IMCAEA0CYWkJ5+ULrnEhZPGjd2QToDCiSGgAAAQLdLSpD59pFtvlTIzpd69paVLpVNPVdAwxAMAQDTYuNEtIV67VipVSnriCWnkSCkmRkFEQAEAINK9955bpZOaKsXHS9OmSa1aKcgIKACA38jMCml54g5t352uGpXKqkXdaipZIph/aeN32DDOmDHS3/7mji2UvPWWVKu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dwX36Vn/tgb+0FOGfP0/z5873vMZurEs2i9XfPwV/DiS1Htz8YbYl1TsX+PVPo026R50zoUqVKhf72t7+FNm7cGHr11VdD5cuXD02dOvXQNf/4xz9CVapUCb377ruhL7/8MnTFFVeE6tatG9q3b18o0mVmZoZOPPFEb7XT4a6//nrv3Pz580MrV64MJSQkeI9IN2DAgNDxxx/vrVaxlQYzZswIHXfccaG77rorFO3fM3PmzPFWDnz33XehDz/8MNSkSZNQy5YtQwcOHIiq+7J7925v9Yk97Ff5E0884b2fveIiP/ehQ4cOobPPPju0bNmy0OLFi0P169cP9erVKxTp9+aXX37xjt9//33v/BtvvOEdJyUlRfTvnt2/c1/s56dLly6hE044IbRmzRrvXmQ/9u/f78v3DAGlmMyaNSvUuHFjb5lfgwYNQs8//3yu87YscPTo0aGaNWt611x66aWhr7/+OhQN5s6d6/2w5PX52i/TG264IVS1alUv1F111VW5folEqtTUVG/Jtf2CLFu2bOiUU07xltHm/EURrd8zb775pnc/YmNjvaW0I0aM8JaFRtt9WbBggfdzc/jDwm1+74O9UNuLS8WKFUOVK1cODRo0yHsRi/R7M2XKlDzPjxkzJqJ/9yz4nfuSveQ6r4f9Oz++Z2LsP4XfLwMAAFBwzEEBAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAACBQ0ABAAAKmv8PlkRBTM7/du0AAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from matplotlib import pyplot as plt # type: ignore\n",
    "\n",
    "%matplotlib inline\n",
    "x_temp = np.linspace(60, 120, 100)  # 绘制直线生成的临时点\n",
    "\n",
    "plt.scatter(x, y)\n",
    "plt.plot(x_temp, x_temp * w1 + w0, \"r\")\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "154.5227329816629\n"
     ]
    }
   ],
   "source": [
    "# 如果你手中有一套 150 平米的房产想售卖，获得预估报价就只需要带入方程即可：\n",
    "\n",
    "def predict(x: float, w0: float, w1: float):\n",
    "    return w0 + w1 * x\n",
    "\n",
    "print(predict(150, w0, w1))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
